<?php

namespace Ledger\Controller;

use Zend\Mvc\Controller\AbstractActionController;
use Zend\View\Model\ViewModel;

class AccountController extends AbstractActionController {
	
	public function indexAction() {
		// Gather all account & transaction data, triage transaction lists to accounts,
		$accountsTable = $this->getServiceLocator()->get('Db\Accounts');
		
		//$view->setVariable('accounts', $allAccounts);
		
		// calculate & assign totals for accounts, including special house balances...
		return array(
			'accounts' => $accountsTable->select()
		);
	}

	public function viewAction() {
		// view the account details
		// include five transactions, optionally full list
		return new ViewModel();
	}

	public function UpdateAction() {
		// update some particulars, e.g. name
		return new ViewModel();
	}

	public function makePayment() {
		// transfer some of our cashmoney to another account
	}

}
